<?php include("page/slide/slide_image.php"); ?>
<div class="cover" style="margin-top:10px;">
    <div class="cover_topic"> Giới thiệu </div>
    <div class="cover_content">
    	<?php
			$row2 = mysql_fetch_array(mysql_query(" SELECT id,content FROM info WHERE content != '' "));
			echo $row2['content'];
		?>
    </div>
</div>

<div class="cover">
    <div class="cover_topic"> Tin tức tuyển sinh </div>
    <div class="cover_content">
    	<?php  
			$res = mysql_fetch_array(mysql_query("  SELECT id,topic,avatar,content_sum FROM news 
													WHERE category_id = '1' ORDER BY date DESC LIMIT 0,1 "));
			$query = mysql_query(" SELECT id,topic FROM news WHERE category_id = '1' ORDER BY date DESC LIMIT 1,3 ");
		?>
    	<div class="tinmoi"> 
        	<div class="tinmoi_img">
            	<a href="p_tin-tuc_<?php echo $res['id']; ?>_<?php echo $res['topic']; ?>.html "> <img src="img/upload/<?php echo $res['avatar']; ?>" width="100px" height="100px" /> </a>
            </div>
            <div class="tinmoi_content">
	            <a href="p_tin-tuc_<?php echo $res['id']; ?>_<?php echo $res['topic']; ?>.html "> 
                            <?php echo trim($res['topic']); ?> 
                    </a> <span> <?php echo $res['content_sum']; ?> </span>
            </div>
            <div class="clear"> </div>            
        </div>
        <div class="tinlienquan">
			<?php
                while($row = mysql_fetch_array($query))
				{
					$id = $row['id'];
                      ?>
                   <li> <a href='p_tin-tuc_<?php echo $row['id']; ?>_<?php echo $res['topic']; ?>.html'>
                               <img src='img/pic/red-star.gif' /> <? echo $row['topic']; ?> </a> </li>
			<?php	} ?>
        </div>
		<div class="clear"> </div>
    	
    </div>
</div>

<div class="cover">
    <div class="cover_topic" id="tai-lieu"> Tài liệu ôn tập </div>
    <div class="cover_content">
    <?php
		$sql = mysql_query(" SELECT id,topic,content,date FROM document WHERE topic != '' ORDER BY date DESC LIMIT 0,5 ");
		if(mysql_num_rows($sql) >0)
		{
			while($r = mysql_fetch_array($sql))
			{
				echo "<li style='margin:8px 0px 2px 10px;'> 
						<img src='img/pic/green-star.gif' /> 
							<a href='http://docs.google.com/viewer?url=luyenthi73hungvuong.site50.net/img/upload/document/".$r['content']."' target='_blank'>
								".$r['topic']." </a> 
					</li>";
			}	
		}
	?>
    </div>
</div>

<div class="cover">
    <div class="cover_topic"> Đề thi các năm </div>
    <div class="cover_content" style="margin-bottom:150px;">
    	<table border="0" width="100%">
        	<tr>
            	<td width="50%"> 
                	<?php
						$query1 = mysql_query(" SELECT * FROM exam WHERE name != '' ORDER BY date DESC LIMIT 0,5 ");
						while($row1 = mysql_fetch_array($query1))
							echo "<li style='margin:8px 0px 2px 10px;'> 
									<img src='img/pic/green-star.gif' /> 
										<a href='http://docs.google.com/viewer?url=luyenthi73hungvuong.site50.net/img/upload/exam/".$row1['content']."' target='_blank'>
											".$row1['name']." </a> 
								</li>";
					?>
                </td>
                
                <td> 
                	<?php
						$query2 = mysql_query(" SELECT * FROM answer WHERE name != '' ORDER BY date DESC LIMIT 0,5 ");
						while($row2 = mysql_fetch_array($query2))
							echo "<li style='margin:8px 0px 2px 10px;'> 
									<img src='img/pic/green-star.gif' /> 
										<a href='http://docs.google.com/viewer?url=luyenthi73hungvuong.site50.net/img/upload/answer/".$row2['content']."' target='_blank'>
											".$row2['name']." </a> 
								</li>";
					?>
                </td>
            </tr>
            <tr>
            	<td colspan="2">
                	<p style="text-align:right; font-size:16px; text-decoration:underline;"> <a href="index.php?p=view_ex"> Xem thêm đề thi và đáp án </a> </p>
                </td>
            </tr>
        </table>
    
    </div>
</div>
    
